package xyz.zhangyi.onjava.java11;

import javax.annotation.Nonnull;
import java.util.List;
import java.util.stream.Collectors;

public class VarInLambda {
    public String upperAndJoin(String... texts) {
        var languages = List.of(texts);
        return languages.stream()
                .map((@Nonnull var l) -> l.toUpperCase())
                .collect(Collectors.joining(", "));
    }
}
